*** Settings ***
Documentation    TC06-Update Lane FCL
Resource    ../../Keywords/Common_Head.robot
Force Tags    P3
Metadata    Author    Fiona
Metadata    ID    6853435
*** Variables *** 
${G_TENDERID}    AUTO 33293
${TenderTitle}    Regression Test
# ${PROJECT}      TENDER_ID=${TenderId}    TENDER_TITLE=${TenderTitle}    CUSTOEMR_NAME=Miele    CUSTOMER_LEVEL=Global
#           ...   MODE=FCL    DEPUTY=NATZHANG    TEMPLATE=${CURDIR}${/}TestData${/}FCLTemplate-Location-All.xlsx    
*** Test Cases ***
TC06-Update Lane FCL
    ${G_TENDERID}    Generate Tender ID
    Set Suite Variable     ${G_TENDERID}
    ${PROJECT}    Copy Dictionary    ${PROJECT_PARAM}
      Set To Dictionary    ${PROJECT}
    ...    TENDER_ID=${G_TENDERID}    TENDER_TITLE=${TenderTitle}    CUSTOEMR_NAME=Miele    CUSTOMER_LEVEL=Global
          ...   MODE=FCL    DEPUTY=NATZHANG    
    Set Suite Variable    ${PROJECT}
    Step 1 User Goes To Basic Data Management Tender List In Step 1
    Step 2&3 User Goes To Pricing Collaboration Pricing Project
    Step 4 Search Project
    Step 5 Click On Copy Data
    Step 8 Select Current Project In Pricing Project Click On template management button
    Step 9 Click Skip Button In Step4 and Yes In The Pop up
    Step 10 User Clicks Next Round Management Button
    Step 11 User Clicks Update Lane Button
    Step 12 Select Update Existing Lanes, click on Next button
    Step 13 User Clicks Download Button
    Step 14 User Opens The Downloaded File
    Step 15 User Modifies Some Pricing Data From The Download File
    Step 16 User Modifies Some Customized Data From The Download
    Step 17 User Modifies Some Pricing Data From The Download File1
    Step 18 User Modifies Some Pricing Data From The Download File2
    Step 19 User Modifies Some Pricing Data From The Download File3
    Step 20 Click On Download Button Check The Downloaded File
    Step 21 In Pricing Project Page User Selects TenderID Contains
    Step 22 Select This Project 20240815 FCL Regression Click On
    Step 23 User Goes To Basic Data Management Tender List

*** Keywords ***
Step ${step} User Goes To Basic Data Management Tender List In Step 1
    #************************Step 1******************************
    #  Do:
    #      User goes to Basic Data Management Tender List
    #      Click Create button
    #      Input with following attributes
    #      Tender ID some numbers such as 202408151435001 you can
    #     input with current datetime and some random number to
    #     avoid duplicate validation
    #      Tender Title some value such as Regression Test by
    #     Wendy001
    #      Customer 815 Miele
    #      Mode select all
    #      Level Global
    #      Click on Save button
    #  Expected:
    #      Created successfully with the message Tender has been
    #     added
    #************************************************************
    Login Space
    Create Tender    ${G_TENDERID}     ${TenderTitle}    815    true    true    true

Step ${step} User Goes To Pricing Collaboration Pricing Project
    #************************Step 2******************************
    #  Do:
    #      User goes to Pricing Collaboration Pricing Project
    #      User clicks Create Project button
    #  Expected:
    #      A New Project dialog should be opened successfully
    #************************************************************
    ${CurDate}    Get Current Date    result_format=%d/%m/%Y
    ${DealLineDate}    Get Current Date    UTC    +10days    result_format=%d/%m/%Y
    ${FutureDate}    Get Current Date    UTC    +100days    result_format=%d/%m/%Y
    Set To Dictionary    ${PROJECT}    DEADLINE_TM_DATE=${DealLineDate}    VALID_FROM=${CurDate}    VALID_TO=${FutureDate}
    Create Project    ${PROJECT}


Step ${step} Input Following Attributes
    #************************Step 3******************************
    #  Do:
    #      Input following attributes
    #      Tender ID 20240815 Regression
    #      Mode FCL
    #      Deadline to TM current date 10 day
    #      Rate Validity From current date
    #      Rate Validity To current date 100 day
    #      Deputies NATZHANG
    #      Description for regression
    #      Click on Save button
    #  Expected:
    #      A new project is created successfully
    #************************************************************
    Log    Done in step 2

Step ${step} Search Project
    #************************Step 4******************************
    #  Do:
    #      User selects row that project name is 20240815 FCL
    #     Regression
    #  Expected:
    #      The row can be selected successfully
    #************************************************************
    Search Project    ${G_TENDERID}

Step ${step} Click On Copy Data
    #************************Step 5******************************
    #  Do:
    #      Click on Copy Data
    #  Expected:
    #      A dialogue named Copy Target to Project 20240815 FCL
    #     Regression display
    #      Search Criteria
    #      Mode with value AIR uneditable
    #      Customer name with no value
    #      Tender ID with value ALL Editable
    #      Tender Lead with value ALL Editable
    #      RFQ Launch Date with value DD MM YYYY Editable
    #      Search button
    #      Result list has no entry present
    #      Copy Data button is disable now
    #************************************************************
    Copy Data    2024000001    FCL    do not touch me

Step ${step} Input Tender ID With Value 2024000001 Click On Search
    #************************Step 6******************************
    #  Do:
    #      Input Tender ID with value 2024000001 click on Search
    #     button
    #  Expected:
    #      index php attachments get bbed6818 f35c 4750 983e
    #     8bad0a53a928 Result list has one entry as above
    #     information
    #************************************************************
    Log    Done in step 5

Step ${step} Select This Entry Click On Copy Data Button And Yes In
    #************************Step 7******************************
    #  Do:
    #      Select this entry click on Copy Data button and Yes in
    #     pop up window
    #  Expected:
    #      Successfully with messages in pop up window
    #      Tender has been successfully copied from 2024000001 FCL
    #     do not touch me
    #      Please adjust the template and the lanes in Template
    #     Lane Management page if required
    #      After click on OK button
    #      The same message is displayed in Pricing Project page
    #     too
    #************************************************************
    Log    Done in step 5

Step ${step} Select Current Project In Pricing Project Click On template management button
    #************************Step 8******************************
    #  Do:
    #      Select current project in pricing project click on
    #     template management button
    #  Expected:
    #      In the dialog check the information under Step2 should
    #     be the same as project 2024000001 FCL do not touch me
    #************************************************************
    ${project_name}   Set Variable    ${G_TENDERID}-FCL-${TENDER_TITLE}
    Click    xpath = //td[.='${project_name}']
    Wait Until Keyword Succeeds    5x    300ms    Click    ${Project_toolbar_TemplateManagementButton}
    # Check on Customer Data tab
    Click    //li/a[contains(text(),'Customer Data')]
    ${number1}    get Text    ((//label[contains(.,'TBN')])[1]/../div/div//input)[5]
    Should Be Equal As Numbers    ${number1}    2
    ${DestinationitemsCheckBox}    Get Checkbox State    //label[contains(.,'Destination items')]/input
    Should Be Equal As Strings    ${DestinationitemsCheckBox}    True
    # Check on Pre-Carriage & Origin Local Charges tab
    Click    //li/a[contains(text(),'Pre-Carriage & Origin Local Charges')]
    ${HaulageModeCheckBox}    Get Checkbox State    //label[contains(.,'Origin Pre-Carriage')]/../div//label[contains(.,'Haulage Mode')]/input
    Should Be Equal As Strings    ${HaulageModeCheckBox}    True
    ${text1}    Get Text     ((//label[contains(.,'TBN')])[2]/../div/div//input)[5]
    Should Be Equal As Strings    ${text1}    number

    # Check on Carrier/Port Related Origin Charges tab
    Click    //li/a[contains(text(),'Carrier/Port Related Origin Charges')]
    ${FlatFeeCheckBox}    Get Checkbox State    //label[contains(.,'Advanced Manifest - alternative')]/../div//label[contains(.,'Flat Fee')]/input
    Should Be Equal As Strings    ${FlatFeeCheckBox}    True
    ${DurationFromCheckBox}    Get Checkbox State     //label[contains(.,'Transit Time')]/../div//label[contains(.,'Duration From Gate-In until Vessel Departure in')]/input
    Should Be Equal As Strings    ${DurationFromCheckBox}    True

    # Check on Ocean Transport Charges tab
    Click    //li/a[contains(text(),'Ocean Transport Charges')]
    ${SpecialEquipmentSurcharge_20CheckBox}    Get Checkbox State    //label[contains(.,'Special Equipment Surcharge')]/../div//label[contains(.,"20'")]/input
    Should Be Equal As Strings    ${SpecialEquipmentSurcharge_20CheckBox}    True
    ${number2}    Get Text     ((//label[contains(.,'TBN')])[3]/../div/div//input)[2]
    Should Be Equal As Numbers    ${number2}    1
    # Check on Demurrage & Detention tab
    Click    //li/a[contains(text(),'Demurrage & Detention')]
    ${perrequestedcontainertypeCheckBox}    Get Checkbox State    //label[contains(.,'DB SCHENKER Origin Demurrage')]/../div//label[contains(.,"per requested container type")]/input
    Should Be Equal As Strings    ${perrequestedcontainertypeCheckBox}    True
    ${Cost-DayAfterFreeTime20CheckBox}    Get Checkbox State    //label[contains(.,'DB SCHENKER Destination Demurrage')]/../div//label[contains(.,"Cost-Day After Free Time 20'")]/input
    Should Be Equal As Strings    ${Cost-DayAfterFreeTime20CheckBox}    True

    # Check on Carrier/Port Related Destination Charges tab
    Click    //li/a[contains(text(),'Carrier/Port Related Destination Charges')]
    ${CurrencyCheckBox}    Get Checkbox State    //label[contains(.,'Free Out Charge (if applicable)')]/../div//label[contains(.,"Currency")]/input
    Should Be Equal As Strings    ${CurrencyCheckBox}    True
    ${BasisCheckBox}    Get Checkbox State    //label[contains(.,'Terminal Security Charge Destination')]/../div//label[contains(.,"Basis")]/input
    Should Be Equal As Strings    ${BasisCheckBox}    True
    # Check on On-Carriage & Destination Local Changes tab
    Click    //li/a[contains(text(),'On-Carriage & Destination Local Changes')]
    ${Costafterfreetime40CheckBox}    Get Checkbox State    xpath=//label[contains(.,'Container Storage at Destination')]/../div//label[contains(.,"40'")]/input
    Should Be Equal As Strings    ${Costafterfreetime40CheckBox}    True
    ${number3}    Get Text     ((//label[contains(.,'TBN')])[4]/../div/div//input)[8]
    Should Be Equal As Numbers    ${number3}    3

Step ${step} Click Skip Button In Step4 and Yes In The Pop up
    #************************Step 9*****************************
    #  Do:*
    #      Click Skip button in Step4 and Yes in the pop up
    #     windown
    #  Expected:
    #      Next Round Management button is enable
    #************************************************************
    Click    ${Template_SkipSendToGPDButton}
    Check Text Value    ${SkipSendToGPDMessage}    Are you sure to skip push pricing?
    Click    ${SkipSendToGPD_Yes}

Step ${step} User Clicks Next Round Management Button
    #************************Step 10******************************
    #  Do:
    #      User clicks Next round management button
    #  Expected:
    #      A dialogue named Project 20240815 FCL Regression Round1
    #     display
    #      It divides into 5 parts
    #      1 Generation Information current Pricing Round 1
    #     Started 2 lanes
    #      2 Assignment
    #      3 Attached Document
    #      4 Round History
    #      5 The tasks status Region Country My tasks
    #************************************************************
    Wait Until Keyword Succeeds    5x    300ms    Click    ${Template_NextRoundManagementButton}
    Wait For Elements State    //h4/span[contains(text(),"Project ${G_TENDERID}-FCL-${TenderTitle}")]
    Wait For Elements State    //legend[.="Generation Information"]
    Wait For Elements State    //legend[.="Assignment"]
    Wait For Elements State    //legend[.="Attached Document"]
    Wait For Elements State    //legend[.="Round History"]
    Wait For Elements State    //a[.="Region"]
    Wait For Elements State    //a[.="My Tasks"]
    

Step ${step} User Clicks Update Lane Button
    #************************Step 11******************************
    #  Do:
    #      User clicks update lane button
    #  Expected:
    #     1. A dialog with the name of project name is displayed".
    #     2. There are three check boxes: update existing lanes, delete existing lanes and add new lanes.
    #     3. There are two boxes:next and close.
    #************************************************************
    Click    ${Project_RoundMgmt_UpdateLaneButton}
    ${Title}    Set Variable    ${PROJECT.TENDER_ID}-${PROJECT.MODE}-${PROJECT.TENDER_TITLE}
    Set Suite Variable    ${Title}    ${Title}
    Wait Until Keyword Succeeds    10x    400ms    Get Page Source    contains    ${Title}    120
    Wait For Elements State    ${Project_LaneMgmt_UpdateInfo}    visible    30
    Wait For Elements State    ${Project_LaneMgmt_DeleteInfo}    visible
    Wait For Elements State    ${Project_LaneMgmt_AddInfo}    visible
    Wait For Elements State    ${Project_LaneMgmt_NextButton}    visible
    Wait For Elements State    ${Project_LaneMgmt_CloseButton}    visible
 
Step ${step} Select Update Existing Lanes, click on Next button
    #************************Step 12******************************
    #  Do:
    #      Select Update Existing Lanes, click on Next button
    #  Expected: 	
    #     1. A new dialog with the name of project name is displayed.
    #     2. Download, Upload, Back, Close buttons are displayed.
    #************************************************************
    ${Status}    Run Keyword And Return Status    Get Checkbox State    ${Project_LaneMgmt_UpdateRadio}    ==    checked
    IF    '${Status}' == 'False'
        Click    ${Project_LaneMgmt_UpdateRadio}
    END
    Click If Enabled    ${Project_LaneMgmt_NextButton}
    Wait For Elements State    ${Project_LaneMgmt_UpdateLane_DownloadButton}     visible    30   60
    Wait For Elements State    ${Project_LaneMgmt_UpdateLane_UploadButton}     visible    30   60
    Wait For Elements State    ${Project_LaneMgmt_UpdateLane_BackButton}     visible    30   60
    Wait For Elements State    ${Project_LaneMgmt_UpdateLane_CloseButton}     visible    30   60
Step ${step} User Clicks Download Button
    #************************Step 12******************************
    #  Do:
    #      User clicks download button
    #  Expected:
    #      A file downloads successfully
    #************************************************************
    ${filename}    Download File    ${Project_UpdateLane_DownloadButton}
    Set Test Variable    ${filename}    ${filename}
    Wait Until Search Finished

Step ${step} User Opens The Downloaded File
    #************************Step 13******************************
    #  Do:
    #      User opens the downloaded file
    #  Expected:
    #      The download file has all of the pricing information It
    #     has two lanes
    #************************************************************
    Open Excel Document     ${filename}    ${PROJECT.MODE}
    ${landInfo}    Read Excel Column    1
    ${rowCount}    Get Length    ${landInfo}
    Should Be Equal As Integers    ${rowCount}    6

Step ${step} User Modifies Some Pricing Data From The Download File
    #************************Step 14******************************
    #  Do:
    #      User modifies some pricing data from the download file
    #     and upload this file as index php attachments get
    #     1548a9a7 a047 404a 8fbb 41bdb0e90400
    #  Expected:
    #      A prompt Upload Result appears on the top
    #      Upload Failed
    #      Error in excel row 5
    #      If IMO value is Y then column Class UN cannot be left
    #     blank Please check and revise AT AU
    #      Error in excel row 6
    #      If IMO value is N Blank then column Class UN must be
    #     left blank Please check and revise AT AU
    #************************************************************
    Write Excel Cell    5    45    Y    ${PROJECT.MODE}_D
    Write Excel Cell    5    46    ${EMPTY}    ${PROJECT.MODE}_D
    Write Excel Cell    5    47    ${EMPTY}    ${PROJECT.MODE}_D
    Write Excel Cell    6    45    N    ${PROJECT.MODE}_D
    Write Excel Cell    6    46    FCL2    ${PROJECT.MODE}_D
    Write Excel Cell    6    47    TSC002    ${PROJECT.MODE}_D
    
    Save Excel Document    ${filename}
    Close All Excel Documents
    Reopen And Save Excel    ${filename} 
    Sleep    5
    
    Wait Until Keyword Succeeds   100    1    Click    ${Project_UpdateLane_UploadButton}
    Wait For Elements State   ${upload_addFileButton}     enabled
    Sleep    2
    Upload File By Selector    ${upload_addFileButton}    ${filename}
    Wait Until Search Finished
    Wait For Elements State    //h4[.="Error in excel row 5"]    visible    timeout=20s
    Wait For Elements State    //li[.="If IMO value is 'Y', then column Class & UN cannot be left blank. Please check and revise! [ AT,AU ]"]
    Wait For Elements State    //h4[.="Error in excel row 6"]
    Wait For Elements State    //li[.="If IMO value is N/Blank, then column Class & UN must be left blank. Please check and revise! [ AT,AU ]"]
    Click    //button[span[.="OK"]]
    

Step ${step} User Modifies Some Customized Data From The Download
    #************************Step 15******************************
    #  Do:
    #      User modifies some customized data from the download
    #     file and upload this file as index php attachments get
    #     6c37934a d2d0 482a ab26 b5544961f560
    #  Expected:
    #      A prompt Upload Result appears on the top
    #      Upload Result
    #      Upload Failed
    #      Error in excel row 5
    #      Input value exceeds the constraint max length of this
    #     is 256 characters Please check and revise AY
    #      123123123123 123 must be in decimal format Please check
    #     and revise AZ
    #      Unknown currency code Please check and revise BA
    #************************************************************
     ${result}=    Evaluate    'abc' * 86  
    # Log    ${result}
    ${filename}    Download File    ${Project_UpdateLane_DownloadButton}
    Set Test Variable    ${filename}    ${filename}
    Wait Until Search Finished   
    Open Excel Document     ${filename}    ${PROJECT.MODE}
    Write Excel Cell    5    51    ${result}    ${PROJECT.MODE}_D
    Write Excel Cell    5    52    123123123123.123    ${PROJECT.MODE}_D
    Write Excel Cell    5    53    aaa    ${PROJECT.MODE}_D
    Save Excel Document    ${filename}
    Close All Excel Documents
    Reopen And Save Excel    ${filename} 
    Sleep    5
    Wait Until Keyword Succeeds   100    1    Click    ${Project_UpdateLane_UploadButton}
    Wait For Elements State   ${upload_addFileButton}     enabled
    Sleep    2
    Upload File By Selector    ${upload_addFileButton}    ${filename}
    Wait Until Search Finished
    Wait For Elements State    //h4[.="Error in excel row 5"]    visible    timeout=20s
    Wait For Elements State    //li[.="Input value exceeds the constraint, max length of this is 256 characters. Please check and revise! [ AY ]"]
    Wait For Elements State    //li[.="123123123123.123 must be in decimal format. Please check and revise! [ AZ ]"]
    Wait For Elements State    //li[.="Unknown currency code. Please check and revise! [ BA ]"]
    Click    //button[span[.="OK"]]

Step ${step} User Modifies Some Pricing Data From The Download File1
    #************************Step 16******************************
    #  Do:
    #      User modifies some pricing data from the download file
    #     and upload this file as index php attachments get
    #     a9269ec6 79b1 40f4 bd0e 22e479d422c9
    #  Expected:
    #      A prompt Upload Result appears on the top
    #      Upload Failed
    #      Error in excel row 5
    #      abc must be in decimal format Please check and revise
    #     CH CJ
    #************************************************************
    ${filename}    Download File    ${Project_UpdateLane_DownloadButton}
    Set Test Variable    ${filename}    ${filename}
    Wait Until Search Finished   
    Open Excel Document     ${filename}    ${PROJECT.MODE}
    Write Excel Cell    5    86    abc    ${PROJECT.MODE}_D
    Write Excel Cell    5    88    abc    ${PROJECT.MODE}_D
    Write Excel Cell    5    90    abc   ${PROJECT.MODE}_D
    Write Excel Cell    5    92    aaa   ${PROJECT.MODE}_D
    Save Excel Document    ${filename}
    Close All Excel Documents
    Reopen And Save Excel    ${filename} 
    Sleep    5
    Wait Until Keyword Succeeds   100    1    Click    ${Project_UpdateLane_UploadButton}
    Wait For Elements State   ${upload_addFileButton}     enabled
    Sleep    2
    Upload File By Selector    ${upload_addFileButton}    ${filename}
    Wait Until Search Finished
    Wait For Elements State    //h4[.="Error in excel row 5"]    visible    timeout=20s
    Wait For Elements State    //li[.="abc must be in decimal format. Please check and revise! [ CH,CJ ]"]
    Click    //button[span[.="OK"]]

Step ${step} User Modifies Some Pricing Data From The Download File2
    #************************Step 17******************************
    #  Do:
    #      User modifies some pricing data from the download file
    #     and upload this file as index php attachments get
    #     fc039d75 585e 42f7 965b b46d2734d30c
    #  Expected:
    #      A prompt Upload Result appears on the top
    #      Upload Failed
    #      Error in excel row 5
    #      Unknown currency code Please check and revise KE
    #      123123123123 123 must be in decimal format Please check
    #     and revise KF
    #      abc must be in decimal format Please check and revise
    #     KG
    #************************************************************
    ${filename}    Download File    ${Project_UpdateLane_DownloadButton}
    Set Test Variable    ${filename}    ${filename}
    Wait Until Search Finished   
    Open Excel Document     ${filename}    ${PROJECT.MODE}
    Write Excel Cell    5    291    abc    ${PROJECT.MODE}_D
    Write Excel Cell    5    292    123,123,123,123.12    ${PROJECT.MODE}_D
    Write Excel Cell    5    293    abc    ${PROJECT.MODE}_D
    Save Excel Document    ${filename}
    Close All Excel Documents
    Reopen And Save Excel    ${filename} 
    Sleep    5
    Wait Until Keyword Succeeds   100    1    Click    ${Project_UpdateLane_UploadButton}
    Wait For Elements State   ${upload_addFileButton}     enabled
    Sleep    2
    Upload File By Selector    ${upload_addFileButton}    ${filename}
    Wait Until Search Finished
    Wait For Elements State    //h4[.="Error in excel row 5"]    visible    timeout=20s
    Wait For Elements State    //li[.="Unknown currency code. Please check and revise! [ KE ]"]
    Wait For Elements State    //li[.="123,123,123,123.12 must be in decimal format. Please check and revise! [ KF ]"]
    Wait For Elements State    //li[.="abc must be in decimal format. Please check and revise! [ KG ]"]
    Click    //button[span[.="OK"]]


Step ${step} User Modifies Some Pricing Data From The Download File3
    #************************Step 18******************************
    #  Do:
    #      User modifies some pricing data from the download file
    #     and upload this file as index php attachments get
    #     42190fb9 5068 4c63 90af bf731ce1458e
    #  Expected:
    #      Successfully uploaded
    #************************************************************
    ${filename}    Download File    ${Project_UpdateLane_DownloadButton}
    Set Test Variable    ${filename}    ${filename}
    Wait Until Search Finished
    Open Excel Document     ${filename}    ${PROJECT.MODE}

    Write Excel Cell    5    353    abcdefhij    ${PROJECT.MODE}_D
    Write Excel Cell    5    354    456.00    ${PROJECT.MODE}_D
    Write Excel Cell    5    355    USD    ${PROJECT.MODE}_D
    Write Excel Cell    5    356    abcdefhij    ${PROJECT.MODE}_D
    Write Excel Cell    5    357    456.00    ${PROJECT.MODE}_D
    Write Excel Cell    5    358    USD    ${PROJECT.MODE}_D
    Write Excel Cell    5    359    abcdefhij    ${PROJECT.MODE}_D
    Write Excel Cell    5    360    456.00    ${PROJECT.MODE}_D
    Write Excel Cell    5    361    USD    ${PROJECT.MODE}_D
    Write Excel Cell    5    362    abcdefhij    ${PROJECT.MODE}_D
    Write Excel Cell    5    363    456.00    ${PROJECT.MODE}_D
    Write Excel Cell    5    364    USD    ${PROJECT.MODE}_D
    Write Excel Cell    5    365    abcdefhij    ${PROJECT.MODE}_D
    Write Excel Cell    5    366    456.00    ${PROJECT.MODE}_D
    Write Excel Cell    5    367    USD    ${PROJECT.MODE}_D
    Write Excel Cell    5    368    99.00    ${PROJECT.MODE}_D

    Write Excel Cell    6    353    abcdefhij    ${PROJECT.MODE}_D
    Write Excel Cell    6    354    456.00    ${PROJECT.MODE}_D
    Write Excel Cell    6    355    USD    ${PROJECT.MODE}_D
    Write Excel Cell    6    356    abcdefhij    ${PROJECT.MODE}_D
    Write Excel Cell    6    357    456.00    ${PROJECT.MODE}_D
    Write Excel Cell    6    358    USD    ${PROJECT.MODE}_D
    Write Excel Cell    6    359    abcdefhij    ${PROJECT.MODE}_D
    Write Excel Cell    6    360    456.00    ${PROJECT.MODE}_D
    Write Excel Cell    6    361    USD    ${PROJECT.MODE}_D
    Write Excel Cell    6    362    abcdefhij    ${PROJECT.MODE}_D
    Write Excel Cell    6    363    456.00    ${PROJECT.MODE}_D
    Write Excel Cell    6    364    USD    ${PROJECT.MODE}_D
    Write Excel Cell    6    365    abcdefhij    ${PROJECT.MODE}_D
    Write Excel Cell    6    366    456.00    ${PROJECT.MODE}_D
    Write Excel Cell    6    367    USD    ${PROJECT.MODE}_D
    Write Excel Cell    6    368    99.00    ${PROJECT.MODE}_D
    Save Excel Document    ${filename}
    Close All Excel Documents
    Reopen And Save Excel    ${filename} 
    Sleep    5
    Wait Until Keyword Succeeds   100    1    Click    ${Project_UpdateLane_UploadButton}
    Wait For Elements State   ${upload_addFileButton}     enabled
    Sleep    2
    Upload File By Selector    ${upload_addFileButton}    ${filename}
    Wait Until Search Finished
    Wait For Elements State    //span[.="Successfully uploaded"]

Step ${step} Click On Download Button Check The Downloaded File
    #************************Step 19******************************
    #  Do:
    #      Click on Download button check the downloaded file
    #  Expected:
    #      File download successfully and check the modified place
    #     are the same with the download file
    #************************************************************
    ${filename}    Download File    ${Project_UpdateLane_DownloadButton}
    Set Test Variable    ${filename}    ${filename}
    Wait Until Search Finished
    Open Excel Document     ${filename}    ${PROJECT.MODE}

    ${UPDATE}    Read Excel Cell    5    353    ${PROJECT.MODE}_D
    Should Be Equal    ${UPDATE}    abcdefhij
    ${UPDATE}    Read Excel Cell    5    354    ${PROJECT.MODE}_D
    Should Be Equal As Numbers    ${UPDATE}    456.0
    ${UPDATE}    Read Excel Cell    5    355    ${PROJECT.MODE}_D
    Should Be Equal    ${UPDATE}    USD    
    ${UPDATE}    Read Excel Cell    5    356    ${PROJECT.MODE}_D
    Should Be Equal    ${UPDATE}    abcdefhij
    ${UPDATE}    Read Excel Cell    5    357    ${PROJECT.MODE}_D
    Should Be Equal As Numbers    ${UPDATE}    456.0   
    ${UPDATE}    Read Excel Cell    5    358    ${PROJECT.MODE}_D
    Should Be Equal    ${UPDATE}    USD    
    ${UPDATE}    Read Excel Cell    5    359    ${PROJECT.MODE}_D
    Should Be Equal    ${UPDATE}    abcdefhij
    ${UPDATE}    Read Excel Cell    5    360    ${PROJECT.MODE}_D
    Should Be Equal As Numbers    ${UPDATE}    456.0
    ${UPDATE}    Read Excel Cell    5    361    ${PROJECT.MODE}_D
    Should Be Equal    ${UPDATE}    USD    
    ${UPDATE}    Read Excel Cell    5    362    ${PROJECT.MODE}_D
    Should Be Equal    ${UPDATE}    abcdefhij    
    ${UPDATE}    Read Excel Cell    5    363    ${PROJECT.MODE}_D
    Should Be Equal As Numbers    ${UPDATE}    456.0   
    ${UPDATE}    Read Excel Cell    5    364    ${PROJECT.MODE}_D
    Should Be Equal    ${UPDATE}    USD    
    ${UPDATE}    Read Excel Cell    5    365    ${PROJECT.MODE}_D
    Should Be Equal    ${UPDATE}    abcdefhij    
    ${UPDATE}    Read Excel Cell    5    366    ${PROJECT.MODE}_D
    Should Be Equal As Numbers    ${UPDATE}    456.0    
    ${UPDATE}    Read Excel Cell    5    367    ${PROJECT.MODE}_D
    Should Be Equal    ${UPDATE}    USD    
    ${UPDATE}    Read Excel Cell    5    368    ${PROJECT.MODE}_D
    Should Be Equal As Numbers    ${UPDATE}    99.0   

    ${UPDATE}    Read Excel Cell    6    353    ${PROJECT.MODE}_D
    Should Be Equal    ${UPDATE}    abcdefhij
    ${UPDATE}    Read Excel Cell    6    354    ${PROJECT.MODE}_D
    Should Be Equal As Numbers    ${UPDATE}    456.0
    ${UPDATE}    Read Excel Cell    6    355    ${PROJECT.MODE}_D
    Should Be Equal    ${UPDATE}    USD    
    ${UPDATE}    Read Excel Cell    6    356    ${PROJECT.MODE}_D
    Should Be Equal    ${UPDATE}    abcdefhij
    ${UPDATE}    Read Excel Cell    6    357    ${PROJECT.MODE}_D
    Should Be Equal As Numbers    ${UPDATE}    456.0   
    ${UPDATE}    Read Excel Cell    6    358    ${PROJECT.MODE}_D
    Should Be Equal    ${UPDATE}    USD    
    ${UPDATE}    Read Excel Cell    6    359    ${PROJECT.MODE}_D
    Should Be Equal    ${UPDATE}    abcdefhij
    ${UPDATE}    Read Excel Cell    6    360    ${PROJECT.MODE}_D
    Should Be Equal As Numbers    ${UPDATE}    456.0
    ${UPDATE}    Read Excel Cell    6    361    ${PROJECT.MODE}_D
    Should Be Equal    ${UPDATE}    USD    
    ${UPDATE}    Read Excel Cell    6    362    ${PROJECT.MODE}_D
    Should Be Equal    ${UPDATE}    abcdefhij    
    ${UPDATE}    Read Excel Cell    6    363    ${PROJECT.MODE}_D
   Should Be Equal As Numbers    ${UPDATE}    456.0    
    ${UPDATE}    Read Excel Cell    6    364    ${PROJECT.MODE}_D
    Should Be Equal    ${UPDATE}    USD    
    ${UPDATE}    Read Excel Cell    6    365    ${PROJECT.MODE}_D
    Should Be Equal    ${UPDATE}    abcdefhij    
    ${UPDATE}    Read Excel Cell    6    366    ${PROJECT.MODE}_D
    Should Be Equal As Numbers    ${UPDATE}    456.0    
    ${UPDATE}    Read Excel Cell    6    367    ${PROJECT.MODE}_D
    Should Be Equal    ${UPDATE}    USD    
    ${UPDATE}    Read Excel Cell    6    368    ${PROJECT.MODE}_D
    Should Be Equal As Numbers    ${UPDATE}    99.0    
    Close All Excel Documents
    Remove All Files
Step ${step} In Pricing Project Page User Selects TenderID Contains
    #************************Step 20******************************
    #  Do:
    #      In Pricing Project page User selects TenderID Contains
    #     20240815
    #  Expected:
    #      The project could be found
    #************************************************************
    Click   ${Project_UpdateLane_CloseButton}
    Wait Until Search Finished
    Click    //button[.="Close"]
    Search Project    ${G_TENDERID}
    Wait For Elements State    //td[contains(text(),"${G_TENDERID}")]
    Remove All Files

Step ${step} Select This Project 20240815 FCL Regression Click On
    #************************Step 21******************************
    #  Do:
    #      Select this project 20240815 FCL Regression click on
    #     Delete Project button
    #      Click Yes of the pop up confirm window
    #  Expected:
    #      System displays Project has been deleted
    #************************************************************
    Log    contains in teardown

Step ${step} User Goes To Basic Data Management Tender List
    #************************Step 22******************************
    #  Do:
    #      User goes to Basic Data Management Tender List
    #      Search out the tender created in step1
    #      Click on Delete button
    #      Click on Yes button in the popup dialog
    #  Expected:
    #      System displays Tender has been deleted
    #************************************************************
    Log    contains in teardown
    